package com.neusoft.ecommerce.service.impl;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.neusoft.ecommerce.entity.Manager;
import com.neusoft.ecommerce.exception.EcommerceException;
import com.neusoft.ecommerce.mapper.ManagerMapper;
import com.neusoft.ecommerce.mapper.SuperMapper;
import com.neusoft.ecommerce.service.ManagerService;

/**
 * @author 紫煦桉
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class ManagerServiceImpl extends AbstractSuperServiceImpl<Manager> implements ManagerService {

    private final ManagerMapper managerMapper;

    public ManagerServiceImpl(SuperMapper<Manager> superMapper,ManagerMapper managerMapper) {
        super(superMapper);
        this.managerMapper = managerMapper;
    }

    @Override
    public Manager login(Manager manager) throws EcommerceException {
        return managerMapper.login(manager);
    }

    @Override
    public Manager findManagerName(Manager manager) throws EcommerceException {
        return managerMapper.findManagerName(manager);
    }
}
